package edu.hitsz.supply;

import edu.hitsz.basic.AbstractFlyingObject;
import edu.hitsz.application.Main;
import edu.hitsz.aircraft.HeroAircraft; // 添加这行导入

public abstract class AbstractSupply extends AbstractFlyingObject {
    public AbstractSupply(int locationX, int locationY, int speedX, int speedY) {
        super(locationX, locationY, speedX, speedY);
    }

    @Override
    public void forward() {
        super.forward();
        // 超出屏幕消失
        if (locationY >= Main.WINDOW_HEIGHT) {
            vanish();
        }
    }

    /** 道具生效方法 */
    public abstract void effect(HeroAircraft hero);
}